# -*- coding: UTF-8 -*-

# 导入re模块
import re

# 创建一个字符串正则表达式
condition = '(Chapter)'

# 根据正则表达式的字符串，创建模式的对象
inputFormat = re.compile(condition)

# 创建两个字符串
str1 = "speed 50"
str2 = "Chapter"
str3 = "Please open Chapter 10 and ready for Chapter 11"

# 寻找匹配正则表达式的字符串
result1 = re.search(inputFormat, str1)
result2 = re.search(inputFormat, str2)

# 以列表形式返回所有的匹配项
result3 = re.findall(inputFormat, str3)

if(result1):
    print(result1.group())
else:
    print("格式不匹配！")

if(result2):
    print(result2.group())
else:
    print("格式不匹配！")

if(result3):
    print(result3)
else:
    print("无匹配内容！")